package com.party.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.party.business.domain.TKsQuestion;
import com.party.business.mapper.TKsQuestionMapper;
import com.party.business.service.ITKsQuestionService;
import com.party.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 考试试题Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-09
 */
@Service
public class TKsQuestionServiceImpl extends ServiceImpl<TKsQuestionMapper, TKsQuestion>  implements ITKsQuestionService
{
    @Autowired
    private TKsQuestionMapper tKsQuestionMapper;

    /**
     * 查询考试试题
     *
     * @param id 考试试题主键
     * @return 考试试题
     */
    @Override
    public TKsQuestion selectTKsQuestionById(String id)
    {
        return tKsQuestionMapper.selectTKsQuestionById(id);
    }

    /**
     * 查询考试试题列表
     *
     * @param tKsQuestion 考试试题
     * @return 考试试题
     */
    @Override
    public List<TKsQuestion> selectTKsQuestionList(TKsQuestion tKsQuestion)
    {
        return tKsQuestionMapper.selectTKsQuestionList(tKsQuestion);
    }

    /**
     * 新增考试试题
     *
     * @param tKsQuestion 考试试题
     * @return 结果
     */
    @Override
    public int insertTKsQuestion(TKsQuestion tKsQuestion)
    {
                tKsQuestion.setCreateTime(DateUtils.getNowDate());
            return tKsQuestionMapper.insertTKsQuestion(tKsQuestion);
    }

    /**
     * 修改考试试题
     *
     * @param tKsQuestion 考试试题
     * @return 结果
     */
    @Override
    public int updateTKsQuestion(TKsQuestion tKsQuestion)
    {
                tKsQuestion.setUpdateTime(DateUtils.getNowDate());
        return tKsQuestionMapper.updateTKsQuestion(tKsQuestion);
    }

    /**
     * 批量删除考试试题
     *
     * @param ids 需要删除的考试试题主键
     * @return 结果
     */
    @Override
    public int deleteTKsQuestionByIds(String[] ids)
    {
        return tKsQuestionMapper.deleteTKsQuestionByIds(ids);
    }

    /**
     * 删除考试试题信息
     *
     * @param id 考试试题主键
     * @return 结果
     */
    @Override
    public int deleteTKsQuestionById(String id)
    {
        return tKsQuestionMapper.deleteTKsQuestionById(id);
    }
}
